<div class="modal fade " id="editIndustryModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:75%">
        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">二级行业指标维护</h3>
                <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">关闭</button>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal">
                <div class="box-body">
                    <div id="industryQuotaToolbar">
                        <h4 style="padding-left: 10px"><b><span id="industryScoreSpan"></span></b></h4>
                        <div class="form-inline" role="form" style="display: none">
                            <button type="button" class="btn btn-success" onclick="appAdjustIndustryData()">增加调整
                            </button>
                            <input type="hidden" id="industryCustScoreId">
                            <input type="hidden" id="industryModelVersionId">
                        </div>
                    </div>
                    <table id="editIndustryQuotaTable" data-toggle="table" data-url="#"
                           data-page-size="20" data-height="600" data-unique-id="id" data-search="true"
                           data-toolbar="#industryQuotaToolbar">
                        <thead>
                        <tr>
                            <th data-field="index" data-formatter="indexFormatter">序号</th>
                            <th data-field="dimensionQuotaTypeName">评价维度</th>
                            <th data-field="quotaTypeName" data-formatter="quotaTypeNameFormatter">具体指标</th>
                            <th data-field="quotaValueName" data-align="center">指标值</th>
                            <th data-field="score">分数</th>
                        </tr>
                        </thead>
                    </table>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="button" class="btn btn-default pull-right" data-dismiss="modal">完成</button>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </div>
</div>
<script>

    function appAdjustIndustryData() {
        $table = $("#editIndustryQuotaTable");
        var custScoreId = $("#industryCustScoreId").val();
        var modelVersionId = $("#industryModelVersionId").val();
        var url = "/scoreaudit/adjust/add?modelVersionId=" + modelVersionId + "&custScoreId=" + custScoreId;
        getReq(url, function (result) {
            $table.bootstrapTable("append", result);
            $table.bootstrapTable('scrollTo', 'bottom');
        });
    }

    function editIndustryModalInit(custScoreId, modelVersionId) {
        $("#industryCustScoreId").val(custScoreId);
        $("#industryModelVersionId").val(modelVersionId);
        $("#editIndustryQuotaTable").bootstrapTable("refresh", {url: "/scoreaudit/detailInfo/list?custScoreId=" + custScoreId + "&modelVersionId=" + modelVersionId});
        var url = "/custscore/" + custScoreId;
        $("#industryScoreSpan").html("");
        getReq(url, function (result) {
            if (result.success  ) {
                $("#industryScoreSpan").html(removeDecimal(result.custScoreVo.industryScore) + "分");
            }
        });
    }
</script>